package exceptions;

public class ContrainteException extends Exception {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String message;
	
	public ContrainteException(int errorCode, String methode) {
		message = "Exception in VariableException : \n";
		message += "in "+methode+"\n";
		switch(errorCode) {
			case 0: message += "Contrainte non reguliere\n";
					break;
			case 1: message += "Deux contraintes de meme indice";
					break;
			case 2: message += "Contrainte non trouvee";
					break;
			case 3: message += "ArrayList des variables ou coefficients passees en parametre vides";
					break;
			default:message += "Erreur non repertoriee";
					break;
		}
	}
	
	public void printStackTrace() {
		System.err.println(message);
	}
}
